package entidades;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the sala database table.
 * 
 */
@Entity
@Table(name="sala")
public class Sala implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String id;

	private int capacidad;

	//bi-directional many-to-one association to Funcion
	@OneToMany(mappedBy="salaBean", fetch=FetchType.EAGER)
	private List<Funcion> funcions;

	//bi-directional many-to-one association to Tiposala
    @ManyToOne
	@JoinColumn(name="tipo")
	private Tiposala tiposala;

    public Sala() {
    }

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public int getCapacidad() {
		return this.capacidad;
	}

	public void setCapacidad(int capacidad) {
		this.capacidad = capacidad;
	}

	public List<Funcion> getFuncions() {
		return this.funcions;
	}

	public void setFuncions(List<Funcion> funcions) {
		this.funcions = funcions;
	}
	
	public Tiposala getTiposala() {
		return this.tiposala;
	}

	public void setTiposala(Tiposala tiposala) {
		this.tiposala = tiposala;
	}
	
}